import {EntityId, PageQueryParams} from "kf-web-library";
import * as API from "@/services/core/GlobalService";

export interface MaterialPageQueryParams extends Partial<PageQueryParams> {
  searchText?: string;
  ids?: EntityId[];
  groupId?: EntityId; //分组id
  name?: string;  //名称
  types?: string[]; //素材类型 MaterialType
}
export interface Material{
  deleted: number; //删除标记
  id: number; //主键
  groupId: number; //组id
  name: string; //名称
  url: string; //地址
  type: string; //素材类型(图片、视频) MaterialType
  createTime: string; //创建时间
  createUserId: number; //${column.comment}
  modifyTime: string; //修改时间
  modifyUserId: number; //${column.comment}
}

export interface Material_Move{
  ids: EntityId[];
  toGroupId: EntityId;
}

export interface Material_BatchUrlsCreate {
  groupId?: number;
  /** 地址 */
  urls?: string[];
  type?: string;
}

export interface Material_Create{
  groupId: number; //组id
  name: string; //名称
  url: string; //地址
  type: string; //素材类型(图片、视频) MaterialType
}



export interface Material_Modify extends Material_Create {
  id: EntityId;
}

export interface Material_Patch extends Partial<Material_Modify> {
  id: EntityId;
}

